package com.example.android.utils.models

/**
 * @ClassName MyResult
 * @Author Ryan Kamanri
 * @Date 2022/6/1
 * @Description 后端统一返回的接受对象
 **/
class MyResult<T>(val Code: Int = NOT_INITIALIZED, val Message: String = String(), val Data: T? = null) {
    companion object {
        // not initialized
        const val NOT_INITIALIZED = -1
        // http code
        const val OK = 200
        const val NOT_FOUND = 404
        // Log in status
        const val LOG_IN_SUCCESS = 200
        const val LOG_IN_AUTH_CODE_ERROR = 400
        const val LOG_IN_USER_INEXIST = 401
        const val LOG_IN_PASSWORD_ERROR = 0
    }

}